#include "Command.h"

Command::Command(){
    this->name = "";
    this->instruction = &Calendar::PrintInfo;
}

Command::Command(char* name, void(Calendar::*_instruction)(char** argv)){
    this->name = name;
    this->instruction = _instruction;
}

Command::Command(const Command& _c){
    this->name = _c.name;
    this->instruction = _c.instruction;
}

Command::~Command(){
    
}

bool Command::operator ==(const Command& _c){
    return this->name == _c.name;
}

void Command::Execute(Calendar& _cal, char** argv){
    (_cal.*instruction)(argv);           
}

void Command::PrintCommand(char** argv){
    cout<<"Hello Command"<<endl;
}

//Command Command::Load(){
//    
//}

void Command::Save(){
    
}
